package com.lcvc.xgy.springboot.dao;


import com.lcvc.xgy.springboot.model.Admin;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AdminDao {
    //登录
     int login(@Param(value = "username") String username, @Param(value = "password") String password);
   //信息
    Admin getAdminbyUser(String username);
    //列表
    List<Admin> getAdmins();
//删除
    void deleteAdmin(Integer id);
//添加
    void addAdmin(Admin admin);
//查询重名
    int estimateAdmin(String username);
    //根据id获取
    Admin getAdminbyID(Integer id);
    //查询编辑重名
    int estimateAdminupdata(@Param(value = "username") String username,@Param(value = "id")  Integer id);
// 编辑
  void  updataAdmin(Admin admin);


  //修改密码
    int updatePassword(@Param(value = "id")Integer id,@Param(value = "password")String password);

}

